from apps.ue.models import Season
from apps.ue.models import Edibility
from apps.ue.models import EdibleType
from apps.ue.models import Edible
from apps.ue.models import Comment
from apps.ue.models import EdiblePhoto
from apps.ue.models import CommentPhoto
from apps.ue.models import Recipe 
from apps.ue.models import RecipeComment
from apps.ue.models import RecipePhoto

from django.contrib.gis import admin

class EdibleAdmin(admin.OSMGeoAdmin):

    #map_width=20
    #map_height=8000
    default_zoom=14
    default_lon = -13655584.978922
    default_lat =  5703668.944528399
    exclude = ('user',)
    def save_model(self, request, obj, form, change):
        obj.user = request.user
        obj.save()


admin.site.register(Season)
admin.site.register(Edibility)
admin.site.register(EdibleType)
admin.site.register(Edible, EdibleAdmin)
admin.site.register(Comment)
admin.site.register(EdiblePhoto)
admin.site.register(CommentPhoto)
admin.site.register(Recipe)
admin.site.register(RecipeComment)
admin.site.register(RecipePhoto)



